package org.robot.test;

import org.robot.Spider;
import org.robot.component.Page;

public class Ascopubs extends Spider {

	@Override
	public void parse(Page page) throws Exception {
		System.out.println(page.url());
	}
	
	public static void main(String[] args) {
		Ascopubs claw = new Ascopubs();
		claw.setBaseDirectory("E:/webSpider/ascopubss");
		claw.addSeed("http://ascopubs.org/");
		claw.addRule("div.publicationCoverImage a",".+", "journal");

		claw.addRegex("http://ascopubs.org/loi/.+", "allissue");
		claw.addRule("div.row.js_issue a:contains(2018)",".+", "issue");
		claw.addRule("div.art_title.linkable a",".+", "paper");

		claw.getConfig().setInterval(200);
		claw.start();
	}

}
